Presentation: Tweet"Lambdas all the Way Down. How Functional Programming Made our Work More Efficient and More Fun."
Let me tell you a story of getting from 100% object-oriented Java to purely functional programming in less than a year. It starts with a small team developing a prototype of a personalisation component for our e-commerce site. Two technologies were especially important for us: Clojure and Apache Spark.
Clojure, as a modern LISP, is based on the Lambda Calculus. It enchanted us with simplicity, beauty and pragmatism. Clojure allowed fast creation of production-quality prototypes within our proof-of-concept phase.
Spark is a framework for building applications in a Lambda Architecture. You can think of it as distributed Scala. With its concept of immutable, resilient and distributed datasets (RDDs), it enabled us to apply functional programming techniques on large scale datasets in both stream and batch processing.
Eventually our small prototype team evolved into a fully staffed development team. With Clojure and Spark we frequently introduce new features to investigate new business use cases. Clojure promises to make it simply easy and it delivered for us. We use it wherever we can. While Spark is not simple and has a few pitfalls for the beginner, it is still a powerful and enjoyable tool for processing large datasets.
The code we write today is an order of magnitude less complex than the code we wrote a year ago. Consequentially, our work is significantly more fun, efficient and rewarding. Intrigued by our example, more and more otto.de teams are starting to adopt Clojure, Spark or both. Quite a few of our developers have now waved Java goodbye for good.